<template>
	<view>
		<scroll-view class="diy-cat-0 flex-grow-0" :scrollIntoView="'cat-'+param.cat_index>=2?param.cat_index-2:0" scrollWithAnimation="true" scrollX="true" style="margin-bottom: 10upx;height: 104upx;" v-if="param.list.length>1">
        <view class="flex-row">
            <form @submit="$emit('_formIdSubmit',$event)" class="flex-grow-0" data-bind="catBind" :data-index="index" :data-template="template_index" :id="'cat-'+index" reportSubmit="true" v-for="(item,index) in param.list" :key="item.id">
                <button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
                    <view @tap="$emit('catBind',$event)" :class="['diy-cat-one-0', index==param.cat_index?'active':'', 'flex-y-center flex-x-center']">
                        <view class="text-more">{{item.name}}</view>
                    </view>
                </button>
            </form>
        </view>
    </scroll-view>
    <view class="topic-list">
        <form @submit="$emit('_formIdSubmit',$event)" data-type="navigate" :data-url="item.page_url" reportSubmit="true" v-for="(item,index) in param.list[param.cat_index].goods_list" :key="item.id">
            <button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
                <view :class="['topic-one', 'layout-'+item.layout]">
                    <view class="flex-row" v-if="item.layout==0">
                        <view class="flex-grow-1 flex-col">
                            <view class="flex-grow-1">
                                <view class="topic-title text-more-2">{{item.title}}</view>
                            </view>
                            <view class="flex-grow-0 font-minor fs-sm">{{item.read_count}}人浏览</view>
                        </view>
                        <view class="flex-grow-0">
                            <image class="topic-cover-pic" mode="aspectFill" :src="item.cover_pic"></image>
                        </view>
                    </view>
                    <block v-else>
                        <view class="topic-title" style="font-weight: 600">
                            <view class="text-more-2">{{item.title}}</view>
                        </view>
                        <image class="topic-cover-pic" mode="aspectFill" :src="item.cover_pic"></image>
                        <view class="flex-row">
                            <view class="flex-grow-1 font-minor fs-sm">{{item.read_count}}人浏览</view>
                        </view>
                    </block>
                </view>
            </button>
        </form>
    </view>
    <view class="text-center" style="padding-top:100upx;" v-if="param.list[param.cat_index].goods_list.length==0">暂无内容</view>
	</view>
</template>

<script>var myVue = {};
	export default {
		props:['param','__wxapp_img','show_notice','play','time_all','template_index'],
		data() {
			return {
				
			};
		}
	}
</script>

<style scoped>

</style>
